<script setup>
import { computed } from 'vue'
const props = defineProps({
  item: {
    type: Object,
    default: () => {
      return {}
    }
  }
})

const displayAddr = (item) => {
  return (item.cityName || "") + (item.buildName || "") + (item.areaName || "") + (item.unitName || "")
};

</script>
<template>
  <uni-card>
    <view class="listCard">
      <cell class="f-df f-jc-b">
        <text>设备名称:</text>
        <text>{{ item.deviceName || '无' }}</text>
      </cell>
      <cell class="f-df f-jc-b">
        <text>出厂时间:</text>
        <text>{{ item.deliveryTime || '无' }}</text>
      </cell>
      <cell class="f-df f-jc-b">
        <text>厂家:</text>
        <text>{{ item.factoryName || '无' }}</text>
      </cell>
      <cell class="f-df f-jc-b" >
        <text>用户:</text>
        <text>{{ item.userName || '无' }}</text>
      </cell>
      <cell class="f-df f-jc-b" >
        <text>用户电话:</text>
        <text>{{ item.phoneNo || '无' }}</text>
      </cell>
      <cell class="f-df f-jc-b" >
        <text>用户地址:</text>
        <text>{{  displayAddr(item)  }}</text>
      </cell>
      <cell class="f-df f-jc-b">
        <text>安装人:</text>
        <text>{{ item.installerName || '无' }}</text>
      </cell>
      <cell class="f-df f-jc-b">
        <text>安装时间:</text>
        <text>{{ item.installationTime || '无' }}</text>
      </cell>
    </view>
  </uni-card>
</template>

<style lang="scss" scoped>
.listCard {
  display: flex;
  flex-direction: column;
}

.btn-box {
  display: flex;
  justify-content: flex-end;
  margin-top: 24upx;
}
</style>
